<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGameHldyUserInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('game_hldy_user_info', function (Blueprint $table) {
            $table->increments('id')->comment('欢乐钓鱼用户信息表');
            $table->integer('user_id')->unsigned()->comment('用户id');
            $table->integer('lucky_num')->unsigned()->comment('幸运值')->default(0);
            $table->integer('total_get_gold')->unsigned()->comment('总收获金币')->default(0);
            $table->integer('total_play')->unsigned()->comment('总下杆数')->default(0);
            $table->integer('hit_times')->unsigned()->comment('下杆钓中数')->default(0);
            $table->decimal('hit_rate', 20, 2)->comment('下杆钓中率')->default(0);
            $table->integer('add_time')->unsigned()->comment('创建时间')->default(0);
            $table->integer('update_time')->unsigned()->comment('更新时间')->default(0);
            $table->unique('user_id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
